#ifndef _QY_URL_REQUEST_H
#define _QY_URL_REQUEST_H

#include <string>

namespace qy
{

enum URLScheme
{
    SCHEME_INVALID = 0,
    SCHEME_HTTP,
    SCHEME_HTTPS,
    SCHEME_FTP
};

class URLRequest
{
public:
    URLRequest(const std::string &url);
    virtual ~URLRequest();

    std::string url() const { return m_url; }
    std::string host() const { return m_host; }
    int port() const { return m_port; }
    std::string user() const { return m_user; }
    void setUser(const std::string &user) { m_user = user; }
    std::string password() const { return m_password; }
    void setPassword(const std::string &password) { m_password = password; }
    URLScheme scheme() const { return m_scheme; }
private:
    std::string m_url;
    std::string m_host;
    int m_port;

    std::string m_user;
    std::string m_password;

    URLScheme m_scheme;
/*
    enum url_scheme scheme;        URL scheme 


     URL components (URL-quoted). 
    char *path;
    char *params;
    char *query;
    char *fragment;

     Extracted path info (unquoted). 
    char *dir;
    char *file;*/
};

}

#endif
